module.exports = {
    // 配置文件夹别名
    configureWebpack: {
        resolve: {
            alias: {
                assets: "@/assets",
                components: "@/components",
                request: "@/request",
                views: "@/views"
            }
        }
    },
    devServer: {
        // 配置代理 解决跨域 (浏览器有个同源策略)
        proxy: {
            "/api": {
                target: "http://www.codeman.ink:3000/",
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    "^/api": ""
                }
            }
        },
        // 省略其他配置
        historyApiFallback: true,
        allowedHosts: "all"
    }
};
